/**
 * Copyright: Copyright (c) 2018 
 * Company:
 * 
 * @author XueWei
 * @date 2018年8月30日 下午1:12:32
 * @version V1.0
 */
package com.smartcommunity.dao.village;

import com.smartcommunity.entity.village.RealCompany;
import com.smartcommunity.entity.village.RealCompanyPeople;
import com.smartcommunity.entity.village.SixStatisticsEntity;
import com.smartcommunity.entity.village.dto.UpdateRealCompanyPeopleDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
  * @ClassName: RealCompanyDao
  * @Description: 实有单位dao接口定义
  * @author XueWei
  * @date 2018年8月30日 下午1:12:32
  *
  */
@Mapper
 public interface RealCompanyDao {
    /**
     * @Description: 根据条件查询实有单位数据
     * @param: Map<String, Object>
     * @return: List<RealCompany>
     * @author: minsheng
     * @date: 2019/1/3 14:19
     */
    List<RealCompany> listRealCompanies(Map<String, Object> map);

    /**
     * 根据条件查询实有单位从业人员数量
     * @param map
     * @return
     */
    List<Map<String,Object>> listRealCompaniesPeopleCount(Map<String, Object> map);

    /**
     * @Description: 根据条件查询实有单位从业人员数据
     * @param: Map<String, Object>
     * @return: List<RealCompanyPeople>
     * @author: minsheng
     * @date: 2019/1/3 14:19
     */
    List<RealCompanyPeople> getRealCompanyPeopleList(Map<String, Object> map);

    List<RealCompanyPeople> checkInsertCompanyPeople(Map<String, Object> map);
    /**
     * @Description: 查询实有单位数量
     * @param: map
     * @return: int
     * @author: minsheng
     * @date: 2019/1/15 14:44
     */
    int countRealCompanies(Map<String, Object> map);


    List<SixStatisticsEntity> companiesCountGroupByVillage();
   /**
    * 获取实有单位信息
    * @param id
    * @return
    */
    RealCompany getRealCompany(String id);
   /**
     * 
      * @Title: addRealCompany
      * @Description: 新增实有单位
      * @param realCompany
     */
     void insertRealCompany(RealCompany realCompany);

    /**
      * @Title: updateRealCompany
      * @Description: 修改实有单位
      * @param realCompany
      */
     void updateRealCompany(RealCompany realCompany);

    /**
     * 
      * @Title: deleteRealCompany
      * @Description: 删除实有单位
      * @param paramMap
     */
     void deleteRealCompany(Map<String, Object> paramMap);
     void deleteRealCompanyByVillageCode(String villageCode);

    /**
      * @Title: addRealCompanyByList
      * @Description: 批量新增实有单位
      * @param realCompanyList
      */
     void addRealCompanyByList(List<RealCompany> realCompanyList);

    /**
      * @Title: updateRealCompanyByList
      * @Description: 批量更新实有单位照片
      * @param pathList
      */
     void updateRealCompanyByList(List<Map<String, Object>> pathList);

    /**
     * 根据小区编号，单位名称批量更新
     * @param realCompanyList
     */
    void batchUpdateRealCompanyByName(List<RealCompany> realCompanyList);


    /**
      * @Title: getMaxCompanyId
      * @Description: 获取最大的companyid
      * @return
      */
     Integer getMaxCompanyId();
    /**
     * @Description: 更新公司经纬度
     * @param: RealCompany
     * @return: void
     * @author: minsheng
     * @date: 2019/1/5 11:04
     */
    void updateCompanyCoord(RealCompany realCompany);

    /**
     * @Title: addRealCompanyPeople
     * @Description: 新增从业人员信息
     * @param realCompanyPeople
     */
    void insertRealCompanyPeople(RealCompanyPeople realCompanyPeople);

    /**
     * @Title: updateRealCompanyPeople
     * @Description: 修改从业人员
     * @param realCompanyPeople
     */
    void updateRealCompanyPeopleNew(UpdateRealCompanyPeopleDto realCompanyPeople);
    void updateRealCompanyPeople(RealCompanyPeople realCompanyPeople);


    /**
     * @Title: deleteRealCompanyPeople
     * @Description: 删除从业人员
     * @param paramMap
     */
    void deleteRealCompanyPeople(Map<String, Object> paramMap);

    RealCompanyPeople getRealCompanyPeople(String id);

    /**
     * @Title: addRealCompanyPeopleByList
     * @Description: 批量新增实有单位从业人员
     * @param realCompanyList
     */
    void addRealCompanyPeopleByList(List<RealCompanyPeople> realCompanyList);

    /**
     * @Title: updateRealCompanyPeopleByList
     * @Description: 批量导入实有单位从业人员身份照片
     * @param pathList
     */
    void updateRealCompanyPeopleByList(List<Map<String, Object>> pathList);

    /**
     * 商圈从业人员年龄统计
     * @param params
     * @return
     */
    Integer avgCount(Map<String, Object> params);

    /**
     * 单位性质柱状图
     * @param params
     * @return
     */
    List<RealCompany> countCompanyNature(Map<String, Object> params);

    /**
     * 商铺类型柱状图
     * @param params
     * @return
     */
    List<RealCompany> countCompanyType(Map<String, Object> params);

    Integer getRealCompanyCount();

    void deleteRealCompanyPeopleByNo(@Param("nos") List<String> nos);
}
